home *** CD-ROM | disk | FTP | other *** search
- %OP%DP0
- %OP%IRY
- %OP%PL0
- %OP%HM0
- %OP%FM0
- %OP%BM0
- %OP%LM4
- %OP%FX
- %OP%FY
- %OP%FS
- %OP%PT1
- %OP%PDPipeLine
- %OP%WC816,2068,180,1620,0,0,0,0
- %OP%VS4.01 (22-Oct-91), Gerald Fitton, R4000 2915 6625 6368
- %CO:A,72,72%
- %C%Arrays - Part 2
- %C%by Gerald L Fitton
- Keywords:
- Array Matrix Fitton
-
- This is Part 2 of the "Arrays" series. Part 1 is in the directory
- Array1. You should read it first.
-
- Binary Operations on Pairs of Arrays
- If you have two numerical arrays of equal sizes then you can carry out
- addition, subtraction, multiplication, etc on the pair to create a
- third array.
-
- Load the array [Array02] from this directory. You will see that there
- are two arrays, one in B10 and the other in E10. These arrays have
- been loaded into the single slots in the same way as the array in file
- [Array01]; in fact, B10 is the same array.
-
- Position the caret in slot B20 and, in the formula line you will see
- the formula B10+E10. This formula adds the two arrays together element
- by element. The array in B20 is expanded to the range B22C26 so that
- you can see what has happened. Adding element by element means that
- the array addition operation in B20 is equivalent to the ten additions
- B22 = B2 + E2, B23 = B3 + E3, etc.
-
- Similarly in E20 you will find the array multiplication B10 * E10.
- This array function multiplies element by element so that it is
- equivalent to ten multiplications.
-
- The file [Array02a] contains an elaboration on the same theme of binary
- operations, element by element on pairs of arrays. One of the earliest
- algebraic identities I remember is (a + b)*(a - b) = a^2 -b^2 so I have
- used this as an example of array functions.
-
-
-
-